<!DOCTYPE html>
<html>
    <head>
        <title>javascript程序结构:输入字符串</title>
        <script>
            var name=prompt("输入姓名：","");
            document.write("你好！"+name)
        </script>
    </head>
    <body>
        <h3>输入字符串</h3>
    </body>
</html>